Choosing an Architecture


By Mark Anders, Chief Techology Officer

In the past few years, there has been explosive growth in the cross-platform tools market. Both the number of customers using portability tools and the number of tools available have grown dramatically. On the surface, most of these tools perform a similar function. They provide a means of creating the various components of your application: the windows, controls, and menus. They also provide mechanisms to perform tasks such as drawing text and graphics, and they allow you to compile your code so that it runs with little or no changes on a variety of operating systems.

It is often clear that the quality and capability of the tools vary greatly, but it is not always as apparent that these tools vary in their underlying architecture. While understanding the architecture of some software tools is not critical -- for example knowing how a word processing program internally handles text is not necessarily important to using it -- understanding how a cross-platform toolkit is put together is fundamental to understanding both its short and long term capabilities. There are three general categories of implementation architecture for cross-platform toolkits: Emulation approaches (also known as Virtual Operating Systems), Least Common Denominator approaches, and the Hybrid Superset approach, of which zApp is an example.

Each of these implementation architectures varies in how it works with the standard operating systems. Each operating system has an underlying application programming interface (API) that provides facilities to perform tasks such as creating windows, menus, etc. For example, Microsoft Windows has the Microsoft Windows API, and Motif has three levels of API -- Motif, Xt, and Xlib. Using this standard native API to create windows, menus, and other basic visual components ensures a standard look and feel for the application because the code rendering those visual components is the standard set provided with the operating system. There are also a number of other important characteristics that stem from the cross-platform tool vendor's use, extension, or replacement of the standard native systems. The tool's implementation architecture determines its capabilities now and in the future, and has a major impact on the efficiency, extensibility, and maintainability of the software developed with the tool.

Hybrid Superset Framework

zApp uses a hybrid superset architecture to provide cross-platform portability. The goal of the architecture is to utilize the underlying system as much as possible, taking full advantage of the standard native platform implementation of objects such as windows and menus. Facilities that are not found on any (or some) of the underlying systems are added within the toolkit. Where standard native implementations are available, these are encapsulated by the zApp API. Where standard native implementations are not provided, these are provided directly by zApp. Examples of these extensions to the native APIs include zApp's Sizer based geometry management classes, formatted edit controls and forms capabilities, and device output redirection -- the ability to easily render into bitmaps, onto a printer, or other types of graphics devices.

Utilizing the standard native API means that many changes in the underlying windowing system will be passed on to (or inherited by) the application built on top of the toolkit. This approach also provides easy integration with platform-specific APIs and code. For example, you can take a zApp window object and pass it directly to calls expecting a Windows window handle, or a Motif widget. While this does allow the user to create non-portable, platform-specific code, it provides much greater integration with existing legacy code.

The hybrid superset approach builds on the shoulders of the standard operting system vendors -- Microsoft, the OSF (and UNIX vendors), IBM, and Apple. It takes advantage of the standard windowing systems and utilizes the standard operating systems. This gives users optimum performance; minimizes the footprint of applications; provides clear and direct access to the true native look, feel, and facilities of the standard operating systems of today and tomorrow; and provides an immediate migration path to new versions of the standard operating systems.

Least Common Denominator

The second common architecture in portability toolkits is the least common denominator (LCD) approach. As the name implies, it takes a limited set of features, found on all of the supported platforms, and supports them with a common API. LCD toolkits are usually C-based.

LCD approaches initially appeared as a quick and relatively easy way to take advantage of the standard underlying APIs available on each platform. They provide true native look and feel, and they provide cross-platform support. While they do utilize the underlying system, they typically do so at a level that does not provide enough control for commercial grade applications. They also have glaring omissions from their feature set. For example, they may support Asian languages (double byte character sets), but lack the ability to create a specific font, which is necessary for displaying Asian languages when rendering graphics.

LCD toolkits are typically used when portability is the only concern, and when the limited functionality that the tool provides is adequate for the required task.

Emulation Toolkits

Emulation toolkits do not utilize these platform-specific APIs. When you create a window using an emulation library on Microsoft Windows, for example, it creates something that is an emulation of the standard window provided by Microsoft. Emulation toolkits are typically C-based, and hook into the underlying system at the lowest levels and bypass system user interface facilities. The vendor implements a complete set of controls or widgets that look and behave like the ones provided by the system.

The emulation toolkit provider must re-implement much or all of what has been created by Microsoft, OSF (and the UNIX vendors), IBM, and Apple combined. This is especially true during those times when the user interface of a particular system changes, as is happening now with Microsoft Windows, for example. While applications that utilize the underlying system's API can frequently adopt the new system's look and feel without even re-compiling, applications written using an emulation library will not be able to have the new look and feel until the tool vendor re-writes their library, the tool user re-compiles their application and then distributes the new application to end users. This results in a technology lag as the emulation toolkit developer plays catch up with the system vendors.

Second, there is increased overhead with emulation libraries. Since part of the application includes code to emulate (and replace) facilities that the underlying system provides, programs written with emulation toolkits will always have greater overhead than those that utilize the underlying system.

Third, integration with platform-specific APIs is more difficult or impossible with certain toolkits, as the standard operating system facilities rely on the fact that the objects used by the program are the real thing, and not an imitation. This is especially important as the systems themselves are adding many new API features (such as OLE, OpenDoc, etc.) which you may want to take advantage of. Until and unless the emulation toolkit vendor reimplements these new facilities, the tool user cannot use the new facility (even by giving up portability).

There is also the risk that the emulation is not 100% accurate. The differences can be subtle, and depend entirely on how good a job the vendor does, but keep in mind, it's a big job. Emulation toolkits are frequently very large bodies of source code, sometimes over a million lines of code.

Choosing a Solution

The rapid growth in the cross-platform tools market has provided a number of options for developers. The tools available simplify development and provide cross-platform portability. The architecture of the tools has a major impact on the current and future capabilities of the toolkit, and also in many respects determine the extensibility and maintainability of the code developed with the toolkit. In selecting a tool, it is critical to evaluate the underlying architecture to determine how well it will meet your needs now and in the future.

Bits and Pieces

Training

Inmark hosts zApp Developer's Suite training seminars on a regular basis in the San Francisco Bay Area. These three-day courses offer an in-depth study of the zApp Developer's Suite to programmers already familiar with C++ but new to zApp.

Inmark developers and technical support are on hand to give assistance. In addition, every attendee has a fully loaded computer at their exclusive disposal. The course is strictly limited to 20 attendees to ensure individual attention.

The cost of the seminar is $1495 per person. Discounts are available for groups of 4 or more. Click here for a list of upcoming dates. For more information, contact your sales representative at 800-346-6275.

On-site training is also available through Inmark. For more information, contact your sales representative at 800-346-6275.

New Logo

Here's a look at the new Inmark logo:

Beginning immediately, you will notice Inmark's "new look" on our flyers, ads, and products.

zApp Consultant List

As a service to our customers, Inmark maintains a list of consultants who can help users do anything from getting up and running under zApp to developing complete applications. If you are a consultant or VAR who does extensive work with zApp, we would like to hear from you to discuss adding you to our list. Please call Monica Yarnot at 415-691-9000.

zApp Excellence Awards

If you have developed an application using zApp that is in use today, we would like to honor you. Please send us a brief letter describing your application and what it does, as well as how you used zApp to develop it. In turn, we will send you a handsome plaque commemorating your achievement with zApp. We will also enter you in our "Best zApp App of the Year" contest.

Important Inmark Numbers:

Technical Support: 415-691-9000
Sales: 800-346-6275
BBS: 415-691-9990
CompuServe: GO INMARK
Internet:
support@inmark.com (Technical Support)
sales@inmark.com (Sales)
howard@inmark.com (Howard Love, President of Inmark)
World Wide Web: http://www.inmark.com/

Did you know?

zApp for Windows and Win32 support VBX controls. zApp for Win32 supports NT, Chicago, and NT on the DEC Alpha...Now!

This is the question that is on everyone's lips:

How do you pronounce "zApp"?

Is it "zap" or "zee-app"?

The answer:

Well, we at Inmark pronounce it "zap", but hey, the customer is always right, so you can call it whatever you like.
Previous Newsletter Page
Next Newsletter Page


If you have additional questions, please feel free to contact zApp Technical Support.

© Copyright 1995, Rogue Wave Software, Inc.